package cn.wolfcode.wms.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

//订单
@Getter@Setter
public class OrderBill extends BaseDomain{

    public static final Integer NORMAL = 1;//没有审核
    public static final Integer AUDIT = 2;//已审核


    private String sn;//订单编号
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date vdate;//业务时间
    private Integer status = NORMAL;//单据状态
    private BigDecimal totalAmount;//采购总金额
    private BigDecimal totalNumber;//采购总数
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date auditTime;//审核时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date inputTime;//录入时间

    private Employee inputUser;//录入人
    private Employee auditor;//审核人
    private Supplier supplier;//供应商

    //组合关系(谁也离不开谁)
    private List<OrderBillItem> items = new ArrayList<>();
}
